<?php

namespace app\api\validate;

use think\Validate;

class City extends Validate
{
    protected $rule =   [
        'province_code' => 'require|number|min:6',
    ];

    protected $message  =   [
        'province_code.require' => '省编码不能为空',
        'province_code.number'  => '省编码参数错误', 
        'province_code.min'     => '省编码限制6个字符', 

    ];

    protected $scene = [
        // 搜索市 验证省编码
        'getCity' => ['province_code']
    ];
}
